package com.wf.messageBoard.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wf.apicommons.entity.MessageBoard.LeavingAMessage;
import com.wf.apicommons.entity.chatManagement.ChatRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Description: 留言记录
 */
@Repository
public interface  LeavingAMessageMapper extends BaseMapper<LeavingAMessage> {

    /**
     * 添加留言记录
     * @param leavingAMessage
     * @return
     */
    int insertLeavingAMessage(LeavingAMessage leavingAMessage);


    /**
     * 查询留言消息未读数量
     * @param userId
     * @return
     */
    List<Map<String,Object>> selectLeavingAMessageUnreadQuantity(String userId);


    /**
     * 查询留言列表
     * @param page
     * @param param
     * @return
     */
    Page<Map<String,Object>>  selectLeavingAMessageList(Page<Map<String,Object>> page, @Param("param")  Map<String,Object> param);

    /**
     * 修改留言操作状态
     * @param param
     * @return
     */
    int updateLeavingAMessageIsOperation(Map<String,Object> param);

    /**
     * 修改好友验证状态
     * @param param
     * @return
     */
    int updateFriendsRelationshipApplyWhetherAdopt(Map<String,Object> param);
}
